package day03;

public class Practise {
    public static void main(String[] args) {
        /*double price = 580;
        if (price >= 2000) {
            price *= 0.5;//大于2000打五折
        } else if (price >= 1000) {
            price *= 0.8;//大于1000小于2000打八折
        } else if (price > 500) {
            price *= 0.9;//大于500小于1000打九折
        } else {
            price *= 1.0;//小于500不打折
        }
        System.out.println(price);*/
       /* int a = 400;
        if (a >= 500) {//判断打几折
            a *= 0.8;
            System.out.println(a);
        } else {
            a*=0.9;
            System.out.println(a);
        }
       */
        /* if (a >= 500) {
            a *= 0.8;
        }
        System.out.println(a);*/
        /*
        int score = 1000;
        if (score <= 100 && score >= 0) {//判断成绩是否合法
            System.out.println("成绩合法");
        } else {
            System.out.println("成绩不合法");
        }
       */
        /* if (score <= 100 && score >= 0) {
            System.out.println("成绩合法");
        }
        System.out.println("继续执行");*/
       /* int a = 1, b = 2;
        int flag = a > b ? a : b;
        System.out.println(flag);
        int c = 3, d = 4;
        int max = c > d ? c : d;
        System.out.println("最大值为" + max);*/
        /* System.out.println(10+20+"30");
        System.out.println(""+10+20+30);
        System.out.println(10+""+20+30);//演示字符串连接的同化作用
*/
        /*int age = 17;
        String name ="八云紫";
        System.out.println("你好,我是东方里的"+name+"我永远"+age+"岁");*/
       /* int a = 10, b = 15, c = 5, d = 20;
        System.out.println(a+=b);//a=25
        System.out.println(b-=c);//b=10
        System.out.println(c*=d);//c=100
        System.out.println(d/=a);//d=0
        System.out.println(b%=a);//b=10*/
        /*short s = 10;
        s+=10;
        s=(short) (s+10);//默认为int类型,需要强转为short型
//        System.out.println(s);*/
       /* System.out.println(a>b&&b<c);//a>b是false,
        System.out.println(a<b||c>d);//a<b是true
        System.out.println(a<b&&b>c);//都为true
        System.out.println(d<c||c>b);//都未=为false
        System.out.println(!(!(a>c||c<d)&&!(c>d||d>a)));//首先a>c为true,所以第一个!结果为false.然后d>a为true,所以后一个!为false
                                                        //所以括号里整体为false,外面有个!,所以结果为true
        System.out.println(a>b||c++>d);//演示或语句的短路*/
       /* System.out.println(a > b);//false
        System.out.println(b < c);//false
        System.out.println(a >= c * 2);//true
        System.out.println(d <= a);//false
        System.out.println(a * 2 == d);//true
        System.out.println(a != c);//true
        System.out.println(b==(a+=c));//true*/
        /*int a= 1 ,b=2;
        System.out.println(a++);//输出为1
        System.out.println(a);//2,a自增1
        System.out.println(b++);//输出为2
        System.out.println(--b);//输出为2,b先自增1然后减1*/
        /*int a = 11;
        int b = 3;
        int sum = a%b ;
        System.out.println(sum);//余2*/

    }
}
